{% extends "enterprise/base.html" %}

{% block css %}
{% endblock %}

{% block content %}
    <script type="text/javascript">
        var primary_menu = "menu_2";
        var sub_menu = "menu_2_1";
    </script>
    <div class="col-md-12">
        <div class="panel panel-primary">
            <div class="panel-heading">
                <div class="panel-title"><h3>生产区</h3></div>
                <div class="panel-options">
                    <a href="#" data-rel="collapse"><i class="entypo-down-open"></i></a>
                    <!--<a href="#" data-rel="reload"><i class="entypo-arrows-ccw"></i></a>-->
                </div>
                <div class="stay_right">
                    {% if not p.app_status %}
                        <a href="/facilities/productAreaEdit/{{ p.id }}" class="btn btn-info">修改</a>
                    {% endif %}
                </div>
            </div>
            <div class="panel-body with-table">

            <form>
                <table class="input_in table-detail">
                    <tr>
                        <th width="200">生产区名称</th>
                        <td>{{ p.name }}</td>
                    </tr>
                    <tr>
                        <th>生产区描述</th>
                        <td>{{ p.desc }}</td>
                    </tr>
                </table>
            </form>
            </div>
        </div>
    </div>
<!--     <div class="col-md-12">
        <div class="panel panel-primary">
            <div class="panel-heading">
                <div class="panel-title"><h3>生产单元</h3></div>
                <div class="panel-options">
                    <a href="#" data-rel="collapse"><i class="entypo-down-open"></i></a>
                    <!--<a href="#" data-rel="reload"><i class="entypo-arrows-ccw"></i></a>-->
          <!--       </div>
                <div class="stay_right">
                    {% if not p.app_status %}
                        <a href="/facilities/productionAdd/{{ p.id }}" class="btn btn-info">添加生产单元</a>
                    {% endif %}
                </div>
            </div> -->
                  <!--   <div class="panel-body with-table">
                        <table class="table table-bordered table-responsive">
                            <thead>
                            <tr>
                                <th>序号</th>
                                <th>主要设备名称</th>
                                <th>数量</th>
                                <th>所在生产单元</th>
                                <th>生产的产品编号</th>
                                <th>风险特征</th>
                                <th>操作</th>
                            </tr>
                            </thead>
                            <tbody>
                                {% for p1 in ps %}
                                    <tr>
                                        <td>{{ p1.id }}</td>
                                        <td>{{ p1.name }}</td>
                                        <td>{{ p1.count }}</td>
                                        <td>{{ p1.in_unit }}</td>
                                        <td>{{ p1.code }}</td>
                                        <td>{{ p1.risk }}</td>
                                        <td>
                                            <a href="/facilities/productionDetail/{{ p1.id }}" class="btn btn-success">查看</a>
                                            {% if not p.app_status %}
                                                <a href="/facilities/productionEdit/{{ p1.id }}" class="btn btn-info">修改</a>
                                                <a onclick="beforeDelete('/facilities/productionDel/{{ p1.id }}')" href="javascript:;" class="btn btn-danger">删除</a>
                                            {% endif %}
                                        </td>
                                    </tr>
                                {% empty %}
                                    <tr>
                                        <td colspan=7 style='text-align:center;'>暂无数据</td>
                                    </tr>
                                {% endfor %}
                            </tbody>
                        </table> -->
                        <!-- <div class="row">
                            <div class="col-xs-6 col-left">
                                <div class="dataTables_info" id="table-3_info"></div>
                            </div>
                            <div class="col-xs-6 col-right">
                                <div class="dataTables_paginate paging_bootstrap" style="text-align: right;margin-right: 10px">
                                    <ul class="pagination pagination-sm" >
                                        {% if ps.has_previous %}
                                            <li><a href="?page={{ ps.previous_page_number }}">上一页</a></li>
                                        {% else %}
                                            <li class="disabled"> <span>上一页</span></li>
                                        {% endif %}
                                        {% for p in paginator.page_range %}
                                            {% ifequal p ps.number %}
                                                <li class="active"> <span class="p">{{p}}</span></li>
                                            {% else%}
                                                <li> <a href="?page={{ p }}">{{p}}</a></li>
                                            {% endifequal %}
                                        {% endfor %}
                                        {% if ps.has_next %}
                                            <li class="next">  <a href="?page={{ ps.next_page_number }}">下一页</a></li>
                                        {% else %}
                                            <li class="disabled"><span>下一页</span></li>
                                        {% endif %}
                                    </ul>
                                </div>
                            </div>
                        </div>
                    </div>
        </div>
    </div> --> 

{% endblock %}

{% block js %}
    
{% endblock %}